静态友好方式(PATH_INFO)访问设置
1 | [root@test ~]# more /data/web/zendao/zentaopms/config/my.php |
1 | server { |
GET访问方式设置
1 | [root@test ~]# more /data/web/zendao/zentaopms/config/my.php |
server {
listen 80;
rewrite_log on;
server_name zd.tiger.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /data/web/zendao/zentaopms/www;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root /data/web/zendao/zentaopms/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
禅道开发者api只能本地打开
http://localhost:8080/index.php?m=dev&f=api&module=user